<%@ page language="java" contentType="UTF-8" pageEncoding="UTF-8"%>
    <%@page import="java.util.*"%>
    <%@page import="java.io.OutputStream"%>
  <%@page import="org.apache.poi.hssf.usermodel.HSSFWorkbook" %> 
  <%@page import="java.io.File"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.io.OutputStream"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="wt.util.WTProperties"%> 
<%   

	String path = request.getParameter("path");
	File file = new File(path);
	FileInputStream in = new FileInputStream(file);
	  java.util.Date curTime = new java.util.Date();
	  String exportFileName =request.getParameter("name");
	  exportFileName = URLEncoder.encode(exportFileName,"UTF-8");
	  System.out.println("exportFileName:"+exportFileName);
	  response.reset();
	  response.setContentType("application/vnd.ms-excel");
	  response.setHeader("Content-disposition", "attachment; filename=" + exportFileName + "\";");
	  out.clear();
	  out = pageContext.pushBody();
	  OutputStream os = response.getOutputStream();
	  //out.clear();
	  int c;
			while((c=in.read())!=-1)
			{ 
				os.write(c);
			}
	  os.flush();
	  os.close();
	  out = pageContext.pushBody();
%>  



